

#if 1

#include "Grammar.h"

#include "CProduction_Statement.h"
#include "CProduction_Expression.h"
#include "CProduction_Unit.h"
#include "CProduction_Scope.h"


PRODUCTION("<S>-><statement_list>",CProductionIMPL_trivial);
PRODUCTION("<S>-><empty>",CProductionIMPL_trivial);


PRODUCTION("<statement_list>-><statement_list><statement_complete>",CProduction_Statement_List_Append);
PRODUCTION("<statement_list>-><statement_complete>",CProduction_Statement_List);


PRODUCTION("<statement_complete>-><statement>[;]", CProduction_Statement_Complete);
PRODUCTION("<statement_complete>-><statement_block>", CProduction_Statement_Complete);


PRODUCTION("<statement_block>->[{]<statement_list>[}]",CProduction_Statement_Block);






PRODUCTION("<statement>->[print]<expression>",CProduction_Statement_Print);
PRODUCTION("<statement>-><expression>",CProduction_Statement_Copy);
PRODUCTION("<statement>-><empty>",CProduction_Statement_Empty);

PRODUCTION("<expression>-><expression_a>",CProduction_Expression_Copy);
PRODUCTION("<expression>-><variable>[=]<expression_a>",CProduction_Expression_Assign);

PRODUCTION("<expression_a>-><expression_a>[+]<expression_b>",CProduction_Expression_Plus);
PRODUCTION("<expression_a>-><expression_a>[-]<expression_b>",CProduction_Expression_Minus);
PRODUCTION("<expression_a>-><expression_b>",CProduction_Expression_Copy);

PRODUCTION("<expression_b>-><expression_b>[*]<expression_c>",CProduction_Expression_Mult);
PRODUCTION("<expression_b>-><expression_b>[/]<expression_c>",CProduction_Expression_Divide);
PRODUCTION("<expression_b>-><expression_c>",CProduction_Expression_Copy);

PRODUCTION("<expression_c>-><unit>",CProduction_Expression_Copy);
PRODUCTION("<expression_c>->[-]<unit>",CProduction_Expression_Nagetive);

PRODUCTION("<unit>-><number>",CProduction_Unit_Number);
PRODUCTION("<unit>-><variable>",CProduction_Expression_Copy);
PRODUCTION("<unit>->[(]<expression>[)]",CProduction_Expression_ParentThese);

PRODUCTION("<variable>-><word>",CProduction_Unit_Variable);



#endif